package com.itheima.d2_byte_stream;

import java.io.FileInputStream;

/*
     目标：使用文件字节输入流一次读取完文件的全部字节。
     FileInputStream类
        public byte[] readAllBytes() throws IOException	直接将当前字节输入流对应的文件对象的字节数据装到一个字节数组返回
 */
public class FileInputStreamTest3 {
    public static void main(String[] args) throws Exception {
        FileInputStream fileInputStream = new FileInputStream("E:\\ttt\\a.txt");
        byte[] bytes = fileInputStream.readAllBytes();
        System.out.println(new String(bytes));
        fileInputStream.close();
    }
}
